from aiogram import Dispatcher, types
from aiogram.filters import Text
from aiogram.fsm.state import any_state
from aiogram_dialog import DialogManager, StartMode

from app.bot.states.states import SettingsState


async def display_settings(message: types.Message, dialog_manager: DialogManager):
    await dialog_manager.start(
        SettingsState.display_settings, mode=StartMode.RESET_STACK
    )


def register_wlo_settings_handlers(dispatcher: Dispatcher):
    dispatcher.message.register(
        display_settings,
        Text(text="📒 Авторегер WLO"), any_state
    )
